package com.owner.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.owner.biz.HusbandryBiz;
import com.owner.dao.HusbandryDao;
import com.owner.entity.Husbandry;
@Service("husbandryBiz")
@Scope("prototype")
public class HusbandryBizImpl implements HusbandryBiz{
	@Autowired
	private HusbandryDao husbandryDao;

	public List<Husbandry> getAllHusbandries(String name) {
		// TODO Auto-generated method stub
		return husbandryDao.getAllHusbandries(name);
	}

	public Husbandry getHusbandryById(int id) {
		// TODO Auto-generated method stub
		return husbandryDao.getHusbandryById(id);
	}

	public int deleteHusbandry(int id) {
		// TODO Auto-generated method stub
		return husbandryDao.deleteHusbandry(id);
	}

	public List<Husbandry> getbyId(int id) {
		// TODO Auto-generated method stub
		return husbandryDao.getbyId(id);
	}

	public int updateHusbandry(Husbandry husbandry) {
		// TODO Auto-generated method stub
		return husbandryDao.updateHusbandry(husbandry);
	}

	public int addHusbandry(Husbandry husbandry) {
		// TODO Auto-generated method stub
		return husbandryDao.addHusbandry(husbandry);
	}

	
}
